﻿<%@ Page Title="CUPS Status" Language="vb" AutoEventWireup="false" MasterPageFile="~/Content/Site.Master" CodeBehind="status.aspx.vb" Inherits="CupsApp.Web.Form.status" %>
<%@ Register assembly="wwDataBinder" namespace="MsdnMag.Web.Controls" tagprefix="ww" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" href="../Content/Styles/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
    <script src="../Content/Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../Content/Scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
	<script type="text/javascript">
	$(function() {
		$(".datepicker").datepicker();
	});
	</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="tabs">
 <div class="tab"><asp:LinkButton ID="lnkPersonal" Text = "Personal"  runat="server"   ></asp:LinkButton></div> <div class="tab"><asp:LinkButton ID="lnkBackground" Text = "Background" runat="server"></asp:LinkButton></div> <div class="tab"><asp:LinkButton ID="lnkHealthLegal" Text = "Health / Legal" runat="server"></asp:LinkButton></div> 
 <div class="tab"><asp:LinkButton ID="lnkHousing" Text = "Housing" runat="server"></asp:LinkButton></div><div class="tab"><asp:LinkButton ID="lnkFollowUp" Text = "Follow-Up" runat="server"></asp:LinkButton></div><div class="tabSelected"><asp:LinkButton ID="lnkStatus" Enabled = "false" Text = "Status" runat="server"></asp:LinkButton></div><div class="tab"><asp:LinkButton ID="lnkExit" Text = "Exit" runat="server"></asp:LinkButton></div>
</div>



<div class="Content">
<div class="FullRow1">
     <div class="FormHeading">
         <strong><asp:Label ID="Label6" runat="server" Text="SELECTED CLIENT"></asp:Label></strong>
    </div>
  </div>
<asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource4" 
        Width="100%"> 
        <ItemTemplate >
        <b>First Name:</b><i><%# Eval("FirstName") %></i><br />
        <b>Last Name:</b> <i><%# Eval("LastName") %></i><br />
        <b>Phone No:</b> <i><%# Eval("Phone") %></i><br />
        <b>Email:</b> <i><%# Eval("Email") %></i><br />
        <b>Birth Date:</b> <i><%# Eval("BirthDate") %></i><br />
        </ItemTemplate>   
  </asp:FormView>
<div class="filler">
         <center> <strong><asp:Label ID="lvlMsg" runat="server" ForeColor="#00CC00" ></asp:Label></strong></center></div><div class="filler"></div>
 
   <div class="FullRow1">
     <div class="FormHeading">
     <asp:HiddenField ID ="hiddenStatusID" runat="server" Value="0" />
         <strong><asp:Label ID="lblBasicInfo" runat="server" Text="STATUS UPDATE"></asp:Label></strong>
    </div>
  </div> 
  <div class="filler"></div>
   <div class="FullRow1">
    <div class="ContentRow2">
    </div>
    <div class="ContentRow1">
        <asp:Label ID="Label4" runat="server" Text="Enter Date:"></asp:Label>
    </div>
    <div class="ContentRow2">
        <asp:TextBox ID="txtDate" runat="server" CssClass ="datepicker"></asp:TextBox>
    </div>
    <div class="ContentRow2">
    </div>
  </div> 
  <div class="FullRow1">
    <div class="ContentRow2">
    </div>
    <div class="ContentRow1">
        <asp:Label ID="Label5" runat="server" Text="Location:"></asp:Label>
    </div>
    <div class="ContentRow2">
        <asp:DropDownList ID="ddListLandlord" runat="server" width = "200px" 
            DataSourceID="ObjectDataSource3" DataTextField="Name" DataValueField="ID" 
            AppendDataBoundItems="True">
            <asp:ListItem Value="0">Please select location</asp:ListItem> 
        </asp:DropDownList>
    </div>
    <div class="ContentRow2">
    </div>
  </div> 
 <div class="FullRow1">
    <div class="ContentRow2">
    </div>
    <div class="ContentRow1">
        <asp:Label ID="Label1" runat="server" Text="Update Type:"></asp:Label>
    </div>
    <div class="ContentRow2">
        <asp:DropDownList ID="ddListStatus" runat="server" width = "200px" 
            DataSourceID="ObjectDataSource2" DataTextField="Name" DataValueField="ID">
             <asp:ListItem Value="0">Please select update type</asp:ListItem> 
        </asp:DropDownList>
    </div>
    <div class="ContentRow2">
    </div>
  </div> 
  <div class="FullRow1">
    <div class="ContentRow2">
    </div>
    <div class="ContentRow1">
        <asp:Label ID="Label2" runat="server" Text="Description:"></asp:Label>
    </div>
    <div class="ContentRow2">
        <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" width = "300px" Height="100px" ></asp:TextBox>
    </div>
    <div class="ContentRow2">
    </div>
  </div> 
                                                                                                                                                        <br /><br /><br /><br /><br /><br />
    <div class="FullRow1">
    <div class="ContentRow2">
    </div>
    <div class="ContentRow1">
        <asp:Label ID="Label3" runat="server" Text="Staff Member:"></asp:Label>
    </div>
    <div class="ContentRow2">
        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    </div>
    <div class="ContentRow2">
    </div>
  </div> 
  <div class="FullRow1">
    
     <div class="FormHeading">
            <strong><asp:Label ID="lblFirstLanguage" runat="server" Text="STATUS HISTORY"></asp:Label></strong>
    </div>
  </div> 
   
  <div class="FullRow2"> 
  
      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="900px"
          DataSourceID="ObjectDataSource1" DataKeyNames="ID">
          <Columns>
              <asp:TemplateField ShowHeader="False">
                  <ItemTemplate>
                      <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" 
                          CommandName="Edit1" Text="Edit" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
                  </ItemTemplate>
              </asp:TemplateField>
              <asp:TemplateField ShowHeader="False">
                  <ItemTemplate>
                      <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" 
                          CommandName="Remove1" Text="Delete" CommandArgument='<%# Eval("ID") %>'></asp:LinkButton>
                  </ItemTemplate>
              </asp:TemplateField>
              <asp:BoundField DataField="LastUpdatedDate" HeaderText="LastUpdatedDate" 
                  SortExpression="LastUpdatedDate" />
              <asp:BoundField DataField="Landlord" HeaderText="Landlord" 
                  SortExpression="Landlord" />
              <asp:BoundField DataField="LandlordID" HeaderText="LandlordID" 
                  SortExpression="LandlordID" Visible="False" />
              <asp:BoundField DataField="UpdateType" HeaderText="UpdateType" 
                  SortExpression="UpdateType" />
              <asp:BoundField DataField="UpdateTypeID" HeaderText="UpdateTypeID" 
                  SortExpression="UpdateTypeID" Visible="False" />
              <asp:BoundField DataField="Description" HeaderText="Description" 
                  SortExpression="Description" />
              <asp:BoundField DataField="StaffMember" HeaderText="StaffMember" 
                  SortExpression="StaffMember" />
            
          </Columns>
      </asp:GridView>
  
  </div>
  <asp:HiddenField ID="Client_ID" runat="server" />
  <div class="FullRow1">
     <hr/>
     <center><asp:Button ID="btnSave" runat="server" Text="Save" Width="83px" /></center>
  </div>
    
  <br />

</div>

        <ww:wwDataBinder ID="wwDataBinder1" runat="server">
            <DataBindingItems>
            
  <ww:wwDataBindingItem ID="WwDataBindingItem3" runat="server" ControlId="hiddenStatusID" BindingSource="_data" BindingProperty="Value" BindingSourceMember="ID">
                </ww:wwDataBindingItem>              
<ww:wwDataBindingItem runat="server" ControlId="txtDate" BindingSource ="_data" BindingSourceMember = "LastUpdatedDate">
                </ww:wwDataBindingItem>
                

<ww:wwDataBindingItem ID="WwDataBindingItem1" runat="server" ControlId="txtDescription" BindingSource ="_data" BindingSourceMember = "Description">
                </ww:wwDataBindingItem>
                

<ww:wwDataBindingItem runat="server" ControlId="ddListStatus" BindingSource ="_data" BindingSourceMember ="UpdateTypeID" BindingProperty ="SelectedValue"> 
                </ww:wwDataBindingItem>
                

<ww:wwDataBindingItem ID="WwDataBindingItem2" runat="server" ControlId="ddListLandlord" BindingSource ="_data" BindingSourceMember ="PropertyLandlordID" BindingProperty ="SelectedValue"> 
                </ww:wwDataBindingItem>
                

<ww:wwDataBindingItem runat="server" ControlId="TextBox3" BindingSource="_data" BindingSourceMember="StaffMember">
                </ww:wwDataBindingItem>
            

<ww:wwDataBindingItem runat="server" ControlId="GridView1"></ww:wwDataBindingItem>

</DataBindingItems> 
        </ww:wwDataBinder> 


    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetClientStatusList" TypeName="CupsApp.Service.CupsDomainService">
        <SelectParameters>
            <asp:ControlParameter ControlID="Client_ID" Name="clientID" 
                PropertyName="Value" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>


    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
        SelectMethod="GetClientStatusTypes" 
        TypeName="CupsApp.Service.CupsDomainService"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
        SelectMethod="GetClientProperty" 
        TypeName="CupsApp.Service.CupsDomainService">
        <SelectParameters>
            <asp:ControlParameter ControlID="Client_ID" Name="clientID" 
                PropertyName="Value" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:ObjectDataSource ID="ObjectDataSource4" runat="server" 
        SelectMethod="GetClient" TypeName="CupsApp.Service.CupsDomainService">
         <SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="ClientID" Type="Int32"  />
    </SelectParameters>
    </asp:ObjectDataSource>

</asp:Content>